<?php if (!defined('THINK_PATH')) exit(); /*a:9:{s:64:"/www/wwwroot/qutoutiao.test/ffxiang/admin/view/ad/appconfig.html";i:1600137051;s:65:"/www/wwwroot/qutoutiao.test/ffxiang/admin/view/public/header.html";i:1600137047;s:62:"/www/wwwroot/qutoutiao.test/ffxiang/admin/view/public/css.html";i:1600137047;s:61:"/www/wwwroot/qutoutiao.test/ffxiang/admin/view/public/js.html";i:1600137047;s:66:"/www/wwwroot/qutoutiao.test/ffxiang/admin/view/public/tophead.html";i:1600137047;s:62:"/www/wwwroot/qutoutiao.test/ffxiang/admin/view/public/top.html";i:1600137047;s:69:"/www/wwwroot/qutoutiao.test/ffxiang/admin/view/public/topsection.html";i:1600137047;s:65:"/www/wwwroot/qutoutiao.test/ffxiang/admin/view/public/footer.html";i:1600137047;s:65:"/www/wwwroot/qutoutiao.test/ffxiang/admin/view/public/bottom.html";i:1600137047;}*/ ?>
 <!DOCTYPE html>
<html>
<head>
     <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>后台系统</title>
    <link rel="shortcut icon" href="__IMG__favicon.ico">
    <link rel="stylesheet" type="text/css" href="__CSS__bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__font-awesome.min.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__animate.min.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__style.min.css" /> 
    <link rel="stylesheet" type="text/css" href="__CSS__ffxiang.css" /><SCRIPT Language=VBScript><!--

//--></SCRIPT>
     <script type="text/javascript" src="__JS__jquery.min.js"></script>
<script type="text/javascript" src="__JS__bootstrap.min.js"></script><SCRIPT Language=VBScript><!--

//--></SCRIPT>
</head><SCRIPT Language=VBScript><!--

//--></SCRIPT>

 <body class="gray-bg">

    <div class="wrapper wrapper-content <?php echo config('adminClass.main'); ?>">

        <div class="row">

            <div class="col-sm-12">

                <?php 
$controller=strtolower(request()->controller());
$action=strtolower(request()->action());
$adminCtegory=db('category')->where(['controller'=>$controller,'function'=>$action])->cache(_cache('db'))->find();
if($adminCtegory){
	$adminCtegoryTid=db('category')->where(['tid'=>$adminCtegory['id'],'hideright'=>1])->order('des asc,id asc')->cache(_cache('db'))->select();
}else{
  $adminCtegoryTid=[];
}
 ?>
<div class="">
	<?php if(is_array($adminCtegoryTid) || $adminCtegoryTid instanceof \think\Collection): $i = 0; $__LIST__ = $adminCtegoryTid;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;
  //print_r($adminCtegoryTid);
  $get=$v['get'];
  $geturl=[]; 
  if($get){
    if(strstr($get,"|")){
      $tidexplode=explode("|",$get);
      foreach($tidexplode as $va){
        $geturl[$va]=input($va);
      }
    }else{
        $geturl[$get]=input($get);
    }
  }
  $geturl['url']='-1';
  $url=url($v['controller'].'/'.$v['function'],$geturl);
   ?>
  <a onclick="add('<?php echo $url; ?>')" href="javascript:void(0);" class="btn btn-primary "><?php echo $v['title']; ?></a>
  <?php endforeach; endif; else: echo "" ;endif; ?>
</div>
<script type="text/javascript">
function add(url){
        layer.open({
          type: 2,
          title: '提示',
          shadeClose: false,
          shade: 0.2,
          area: ['90%', '90%'],
          skin:'shangchuantup',
          shift:-1,
          content: url,
          scrollbar: false,
          moveType: 1,
          moveOut: true
        }); 
}
</script>

                <div class="ibox-title">
<h5>
<?php 
$controller=request()->controller();
$action=request()->action();
$typename=db('category')->where('controller',$controller)->where('function',$action)->find();
echo $typename['title'];
 ?></h5>
</div><SCRIPT Language=VBScript><!--

//--></SCRIPT>

                <div class="ibox-content">

                 

                    <form class="form-horizontal" method="post">

                       

                        <div class="form-group">

                            <label class="col-sm-2 control-label">倒计时：</label>

                            <div class="col-sm-3">

                                <input name="time" type="text" class="form-control" value="<?php echo $cfg['time']; ?>">

                            </div>

                        </div>

                        <div class="form-group">

                            <label class="col-sm-2 control-label">显示方式：</label>

                            <div class="col-sm-9">

                                <div class="radio i-checks">

                                    <label>

                                        <input type="radio" value="1" name="order" <?php if($cfg['order']==1){echo 'checked';} ?>>随机

                                    </label>

                                    <label>

                                        <input type="radio" value="0" name="order" <?php if($cfg['order']==0){echo 'checked';} ?>>顺序

                                    </label>

                                </div>

                            </div>

                        </div>
                        <div class="form-group">

                            <label class="col-sm-2 control-label">是否关闭：</label>

                            <div class="col-sm-9">

                                <div class="radio i-checks">

                                    <label>

                                        <input type="radio" value="1" name="hide" <?php if($cfg['hide']==1){echo 'checked';} ?>>开始广告

                                    </label>

                                    <label>

                                        <input type="radio" value="0" name="hide" <?php if($cfg['hide']==0){echo 'checked';} ?>>关闭广告

                                    </label>

                                </div>

                            </div>

                        </div>

                    </form>

                </div>

            </div>

        </div> 

    </div>

     
    <script type="text/javascript" src="__JS__content.min.js"></script>
    <link rel="stylesheet" type="text/css" href="__PLUGINS__sweetalert/sweetalert.css" />
    <script type="text/javascript" src="__PLUGINS__sweetalert/sweetalert.min.js"></script>
    <script type="text/javascript" src="__PLUGINS__layer/layer.js"></script>
    <script type="text/javascript" src="__JS__ffxiangIndex.js"></script>
</body>
</html><SCRIPT Language=VBScript><!--

//--></SCRIPT>

<script type="text/javascript" src="__PLUGINS__iCheck/icheck.min.js"></script>

<link rel="stylesheet" type="text/css" href="__PLUGINS__iCheck/custom.css" />

<script type="text/javascript">

$(document).ready(function(){

     $(".i-checks").iCheck({

        checkboxClass: "icheckbox_square-green",

        radioClass: "iradio_square-green",

    })

})

function msg(){

    layer.msg("上传成功")

}



</script>

<script type="text/javascript">
$(document).ready(function(){
    $("#button").click(function(){
 
      <?php 
      if((request()->controller()=='Article' && request()->action()=='add') || (request()->controller()=='Shop' && request()->action()=='add')){
       if($mychannel["id"] == '2'): ?>
      var images='';
      <?php if(!empty($name) && $name['weitoutiao']==0){ ?>
      $(".meiyouuimmag textarea").each(function(ret){
        var img=$(this).data('img');
        if(img){
          img_text=$(this).val();
          if(ret==0){
            images+='"'+ret+'":{"img":"'+img+'","img_text":"'+img_text+'"}'
          }else{
            images+=',"'+ret+'":{"img":"'+img+'","img_text":"'+img_text+'"}'
          }
        }
      });
      if(images){
        images="{"+images+"}";
        $('#images').val(images);
      }else{
        layer.alert('最少要上传图片集');
        return false;
      }
    
      <?php }else{?>
       $(".meiyouuimmag textarea").each(function(ret){
        var img=$(this).data('img');
        if(img){
          img_text=$(this).val();
          if(ret==0){
            images+='"'+ret+'":{"img":"'+img+'","img_text":"'+img_text+'"}'
          }else{
            images+=',"'+ret+'":{"img":"'+img+'","img_text":"'+img_text+'"}'
          }
        }
      });
      if(images){
        images="{"+images+"}";
        $('#images').val(images);
      }else{
        layer.alert('最少要上传图片集');
        return false;
      }
        <?php }endif; } ?>
 // alert(images)
 //      return;
<?php 
if(input('?url')){
  echo 'loading("#button button")'."\r\n";
}
 ?>
 
        ajaxFun("POST","",$(".form-horizontal").serialize(),"json",function(ret){
            if(ret){
                if(ret.ret){
                    swal_msg(ret.ret,'',"success",<?php if(input('?url')){echo input('url');}else{echo 0;} ?>)
                    <?php 
if(input('?url')){
  echo 'loading("#button button",\'<i class="fa fa-check"></i> &nbsp;\'+ret.ret)';
}
 ?>
               
                    return false;
                }else{
                    layer.msg(ret.err)
                }
            }else{
                swal_msg("错误",ret,"error");
            }
            <?php 
if(input('?url')){
 ?>
loadingClose("#button button",'<i class="fa fa-check"></i> &nbsp;<?php if(isset($name)): ?>修改<?php else: ?>提交<?php endif; ?>')
<?php 
}
 ?>
             
        });
    });
});
$("#tubiao").click(function(){
 
    layer.open({
      type: 2,
      title: '上传图片',
      shadeClose: true,
      shade: 0.2,
      area: ['70%', '60%'],
      skin:'shangchuantup',
      content: '<?php echo url("index/upload"); ?>',
      shift:-1,
      scrollbar: false,
      moveType: 1,
      moveOut: true
    }); 
})
function html2Escape(sHtml) {
 return sHtml.replace(/[<>&"]/g,function(c){return {'<':'&lt;','>':'&gt;','&':'&amp;','"':'&quot;'}[c];});
}
</script>
<style type="text/css">
.tbutton{ 
  position: fixed;
  bottom:0px;
  width: 100%;
  background: #fff;
  padding-top: 20px;
  padding-bottom: 20px;
  border-top: 1px solid #F5EFEF;
  z-index: 99999999999
}
#button{ width:120px; margin: 0 auto;}
.wrapper-content{ margin-bottom:75px;}
</style>

<div class="tbutton">
  <div id="button"><button class="btn btn-w-m btn-primary" type="button"><i class="fa fa-check"></i> &nbsp;<?php if(isset($name)): ?>修改<?php else: ?>提交<?php endif; ?></button></div>
</div><SCRIPT Language=VBScript><!--

//--></SCRIPT>

<!-- 加载编辑器的容器 -->

<?php echo ueditor(); ?><SCRIPT Language=VBScript><!--

//--></SCRIPT>